package tuhao.hibernate.www.daoImpl.user;

import com.tuhao.www.domain.user.User;
import org.springframework.stereotype.Repository;
import tuhao.hibernate.www.dao.user.UserDao;
import tuhao.hibernate.www.daoImpl.BaseDaoImpl;

import javax.persistence.Query;


/**
 * @author fuxingxing
 * @version 2.0
 * @date 2012-7-2-下午2:08:27
 */
@Repository("userDao")
public class UserDaoImpl extends BaseDaoImpl<User> implements UserDao {

    @Override
    public User update1(String userName, Long id) {
        String jpal = "update th_user set user_name = '"+userName+"' where id = "+id;
        Query query = em.createNativeQuery(jpal);
        int result = query.executeUpdate();
        return null;
    }
}
